#pragma once

#include <string>

#include "Consts.h"

namespace Huffman {

	class CodecStream
	{
	public:
		CodecStream(std::string fileName);
		~CodecStream(void);

		virtual int read() =0;
		virtual void write(byte b) =0;

		virtual int readInt() =0;
		virtual void writeInt(int val) =0;

		virtual void read(byte* buffer, int offset, int size) =0;
		virtual void write(byte* buffer, int offset, int size) =0;

		virtual void close() =0;

		std::string getFileName() const; 

	private:
		std::string fileName;
	};
}

